package com.bwjf.dzfp.entity;

public class ResultMsg {
	private boolean success = false;
	private String msg;
	private Object data;

	public Object getData() {
		return data;
	}

	public void setData(Object data) {
		this.data = data;
	}

	public ResultMsg() {

	}

	/**
	 * 
	 * @param success
	 *            结果
	 * @param msg
	 *            结果描述
	 */
	public ResultMsg(boolean success, String msg) {
		this.success = success;
		this.msg = msg;
	}

	/**
	 * 
	 * @param success
	 *            结果
	 * @param successMsg
	 *            当结果为true时的描述
	 * @param errorMsg
	 *            当结果为false时的描述
	 */
	public ResultMsg(boolean success, String successMsg, String errorMsg) {
		this.success = success;
		if (success) {
			this.msg = successMsg;
		} else {
			this.msg = errorMsg;
		}
	}

	public boolean isSuccess() {
		return success;
	}

	public void setSuccess(boolean success) {
		this.success = success;
	}

	public String getMsg() {
		return msg;
	}

	public void setMsg(String msg) {
		this.msg = msg;
	}

}
